<!--grid-->
<div class="">
  <br>
  <div class="homepage-pop">
    <div class="grid-header">
      <div class="grid-title" *ngFor="let column of columns">{{column.title}}</div>
    </div>
    <div class="grid-container">
      <div class="grid-item" *ngFor="let row of rows">
        <div class="grid-itemInfo">{{row.id}}</div>
        <div class="grid-itemInfo">
          <div class="grid-itemInfoImg">
            <img src="{{row.imageUrl}}" alt="">
          </div>
        </div>
        <div class="grid-itemInfo">{{row.description}}</div>
        <div class="grid-itemInfo">{{row.redirectType}}</div>
        <div class="grid-itemInfo">{{row.redirectValue}}</div>
        <div class="grid-itemInfo">
          <button class="action-btn btn-invalid" style="margin-right: 10px;" *ngIf="row.enabled == '0'" (click)="IsEnable(row.id, row.enabled)">目前禁用</button>
          <button class="action-btn" style="margin-right: 10px;" *ngIf="row.enabled == '1'" (click)="IsEnable(row.id, row.enabled)">目前启用</button>
        </div>
        <div class="grid-itemInfo">
          <button class="action-btn" (click)="openEditModal(row.id)">编辑</button>
          <button class="action-btn" (click)="deleteModal(row.id)">删除</button>
        </div>
      </div>
    </div>
    <pagination *ngIf="rows" class="pagination-sm" [(ngModel)]="page" [totalItems]="totalItems" [itemsPerPage]="itemsPerPage"
      [maxSize]="maxSize" [boundaryLinks]="true" [rotate]="false" [firstText]="localText.firstBtn" [lastText]="localText.lastBtn"
      [previousText]="localText.previousBtn" [nextText]="localText.nextBtn" (pageChanged)="onChangeTable($event)" (numPages)="numPages = $event">
    </pagination>
    <pre *ngIf="rows" class="card card-block card-header">页数: {{page}} / {{numPages}}</pre>
  </div>
</div>
<floating-window-edit #floatingWindowEdit (floatWindowEdit)="onChangeTable()"></floating-window-edit>